<template>
	<view class="header">
		<view v-if="isShowBack" class="back" @click="handleBack">
			<image src="https://wx.2024csnl.com/static/lottery/lottery-5.png" alt="" />
		</view>
		<view class="name">
			<text>抽奖</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemBarHeight: getApp().globalData.systemBarHeight,
			}
		},
		props: {
			isShowBack: {
				type: Boolean,
				default: true
			}
		},
		methods: {
			handleBack() {
				this.$router.back()
			}
		}
	}
</script>

<style lang="less" scoped>
	.header {
		position: relative;

		.back {
			position: absolute;
			left: 0;
			top: 0;
			bottom: 0;
			padding: 10px;

			image {
				display: block;
				width: 30px;
			}
		}

		.name {
			height: 50px;
			line-height: 50px;
			text-align: center;

			text {
				font-size: 16px;
				font-weight: normal;
				color: #c60800;
			}
		}
	}
</style>